﻿<?php
define ( 'Copyright', 'QQ:11497576' );
define ( 'ROOT_PATH', $_SERVER ["DOCUMENT_ROOT"] . '/' );
include_once ROOT_PATH . '/sjvip/cookie.php';
global $user,$clientid;
if ($_GET['gItem']!=""){
$gitem=$_GET['gItem'];
}else{
$gitem="hit";
}

$gClass=$_GET['gClass'];

if ($_GET['gMode']!=""){
$gMode=$_GET['gMode'];
}else{
$gMode="0";
}
if ($_GET['sMode']!=""){
$sMode=$_GET['sMode'];
}else{
$sMode="0";
}
//dump($gitem.$gClass);
switch ($gitem){
case "sp":
if ($_GET['gPro']!=""){
$gPro=$_GET['gPro'];
}else{
$gPro=1;
}
if ($_SESSION['tm']==""){
$_SESSION['tm']="特A";
}

if ($_GET ['order_type'] != "") {

if($_GET ['order_type']=="A"){
$ids = "特A";
}else{
$ids = "特B";
}
$_SESSION['tm']=$ids;

	
} else {

if ($_SESSION['tm']!=""){
$ids = $_SESSION['tm'];

}else{
if($_GET ['order_type']=="A"){
$ids = "特A";
}else{
$ids = "特B";
}
$_SESSION['tm']=$ids;
}

}

if($ids=="特A"){
$order="A";
$usds=0;
$usds1=12;
$usds2=15;
$titOrderType="A盤";
}else{
$order="B";
$usds=1;
$usds1=12;
$usds2=15;
$titOrderType="B盤";
}
$lmm=0;
$Type="特码";
$Types="特码";
$scorB=$config['tm'];
$totNum=60;
$class=1;
$sAmtTxt=$sMode==1?1:0;
$menuTabNum=2;
$orderListType = "multi";
$orderMode=0;
$ckAgEarnActi=1;
$diffClass=0;
$douMode=0;

break;
 case "num":
 if ($_GET['gPro']!=""){
$gPro=$_GET['gPro'];
}else{
$gPro=1;
}
 if ($_SESSION['zm']==""){
$_SESSION['zm']="正A";
}

if ($_GET ['order_type'] == "") {

if ($_SESSION['zm']!=""){
$ids = $_SESSION['zm'];
}else{

$ids = "正A";
$usds=8;
$usds1=12;
$usds2=15;
$_SESSION['zm']=$ids;
}
	
} else {

if($_GET ['order_type']=="A"){
$ids = "正A";
$usds=8;
$usds1=12;
$usds2=15;
}else{
$ids = "正B";
$usds=9;
$usds1=12;
$usds2=15;
}
$_SESSION['zm']=$ids;

}

if($ids=="正A"){
$order="A";
$usds=8;
$usds1=12;
$usds2=15;
$titOrderType="A盤";
}else{
$order="B";
$usds=9;
$usds1=12;
$usds2=15;
$titOrderType="B盤";
}

$lmm=0;
$Type="正码";
$Types="正码";
$totNum=53;
$class=0;
$scorB=$config['zm'];
$sAmtTxt=$sMode==1?1:0;
$menuTabNum=0;
$orderListType = "multi";
$orderMode=0;
$ckAgEarnActi=1;
$diffClass=0;
$douMode=0;
break;
 case "numSp":
 if ($_GET['gPro']!=""){
$gPro=$_GET['gPro'];
}else{
$gPro=1;
}
switch ($gClass){
 case "10":
$ids="正1特";
$idc="正1-";
$Types="正1特";
$order="A";
$usds=2;
$usds1=12;
$usds2=15;
break;
 case "11":
$ids="正2特";
$idc="正2-";
$Types="正2特";
$order="A";
$usds=3;
$usds1=12;
$usds2=15;
break;
 case "12":
$ids="正3特";
$idc="正3-";
$Types="正3特";
$order="A";
$usds=4;
$usds1=12;
$usds2=15;
break;
 case "13":
$ids="正4特";
$idc="正4-";
$Types="正4特";
$order="A";
$usds=5;
$usds1=12;
$usds2=15;
break;
 case "14":
$ids="正5特";
$idc="正5-";
$Types="正5特";
$order="A";
$usds=6;
$usds1=12;
$usds2=15;
break;
 case "15":
$ids="正6特";
$idc="正6-";
$Types="正6特";
$order="A";
$usds=7;
$usds1=12;
$usds2=15;
break;
}

$Type="正特";
$lmm=0;
$totNum=58;
$class=0;
$scorB=0;
$sAmtTxt=$sMode==1?1:0;
$titOrderType="";
$menuTabNum=0;
$orderListType = "multi";
$orderMode=0;
$ckAgEarnActi=1;
$diffClass=0;
$douMode=0;
break;
 case "lm":
 if ($_GET['gPro']!=""){


if($_GET['gPro']==44 || $_GET['gPro']==45){
if($gMode==2 || $gMode==3 ||$gMode==4 ||$gMode==5  ){
$gPro=41;
}else{
$gPro=$_GET['gPro'];
}
}else{
$gPro=$_GET['gPro'];
}

}else{
$gPro=41;
}


switch ($gPro){
 case "41":
$ids="二全中";
$order="A";
$usds=13;
$gClass=4;
break;
 case "42":
$ids="二中特";
$order="A";
$usds=13;
$gClass=4;
break;
 case "43":
$ids="特串";
$order="A";
$usds=13;
$gClass=4;
break;
 case "44":
$ids="三全中";
$order="A";
$usds=13;
$gClass=5;
break;
 case "45":
$ids="三中二";
$order="A";
$usds=13;
$gClass=5;
break;

}
$orderMode=2;
$ckAgEarnActi=0;
$Types="连码";
$lmm=1;
$totNum=58;
$class=0;
$scorB=0;
$sAmtTxt=1;
$titOrderType="";
$menuTabNum=6;
$orderListType = "duplex";
$diffClass=0;
$douMode=0;
break;

case "diff":
$gClass=9;
$gPro=1;
$ids="过关";
$order="A";
$usds=14;

$orderMode=2;
$ckAgEarnActi=0;
$Types="過關(2-6串)";
$lmm=0;
$totNum=58;
$class=2;
$scorB=0;
$sAmtTxt=1;
$titOrderType="";
$menuTabNum=0;
$orderListType = "duplex";
$diffClass=1;
$douMode=0;
break;
case "spOth":

switch ($gClass){
 case "8":
$ids="特肖";
$Types="特肖";
$order="A";
$usds=16;
$totNum=12;
break;
 case "17":
$ids="半波";
$Types="半波";
$order="A";
$usds=18;
$totNum=12;
break;
 case "37":
$ids="五行";
$Types="五行";
$order="A";
$usds=38;
$totNum=5;
break;
}

$Type=$Types;
$gPro=1;
$lmm=0;
$class=0;
$scorB=0;
$sAmtTxt=0;
$titOrderType="";
$menuTabNum=2;
$orderListType = "multi";
$orderMode=0;
$ckAgEarnActi=1;
$diffClass=0;
$douMode=0;
break;

case "twOth":

switch ($gClass){
 case "19":
$ids="一肖";
$Types="一肖";
$order="A";
$usds=20;
$totNum=12;
break;
 case "28":
$ids="一肖不中";
$Types="一肖不中";
$order="A";
$usds=29;
$totNum=12;
break;
}

$Type=$Types;
$gPro=1;
$lmm=0;
$class=0;
$scorB=0;
$sAmtTxt=0;
$titOrderType="";
$menuTabNum=2;
$orderListType = "multi";
$orderMode=0;
$ckAgEarnActi=1;
$diffClass=0;
$douMode=0;
break;

case "numOth":

switch ($gClass){
 case "16":
$ids="尾数";
$Types="尾數";
$order="A";
$usds=17;
$totNum=10;
break;
 case "29":
$ids="尾数不中";
$Types="尾数不中";
$order="A";
$usds=30;
$totNum=10;
break;
}

$Type=$Types;
$gPro=1;
$lmm=0;
$class=0;
$scorB=0;
$sAmtTxt=0;
$titOrderType="";
$menuTabNum=2;
$orderListType = "multi";
$orderMode=0;
$ckAgEarnActi=1;
$diffClass=0;
$douMode=0;
break;
case "tw6":

$ids="六肖";
$Types="六肖";
$order="A";
$usds=19;
$totNum=1;
$gClass=18;

$Type=$Types;
$gPro=52;
$lmm=0;
$class=0;
$scorB=0;
$sAmtTxt=1;
$titOrderType="";
$menuTabNum=0;
$orderListType = "multi";
$orderMode=0;
$ckAgEarnActi=1;
$diffClass=0;
$douMode=0;
break;

case "not":
 if ($_GET['gClass']!=""){
$gClass=$_GET['gClass'];
}else{
$gClass=20;
}
switch ($gClass){
 case "20":
$ids="五不中";
$Types="五不中";
$order="A";
$usds=21;
break;
 case "24":
$ids="六不中";
$Types="六不中";
$order="A";
$usds=25;
break;
 case "23":
$ids="七不中";
$Types="七不中";
$order="A";
$usds=24;

break;
 case "25":
$ids="八不中";
$Types="八不中";
$order="A";
$usds=26;
break;
 case "26":
$ids="九不中";
$Types="九不中";
$order="A";
$usds=27;
break;
 case "27":
$ids="十不中";
$Types="十不中";
$order="A";
$usds=28;
break;
}
if($gMode==1){
$douMode=1;
$orderListType = "multi";
}else{
$douMode=0;
$orderListType = "duplex";
}
$totNum=49;
$Type="多選不中";
$gPro=1;
$lmm=0;
$class=0;
$scorB=0;
$sAmtTxt=1;
$titOrderType="";
$menuTabNum=2;
$gMode=0;
$orderMode=2;
$ckAgEarnActi=0;
$diffClass=0;


break;

case "twLm":

 if ($_GET['gPro']!=""){
$gPro=$_GET['gPro'];
}else{
$gPro=55;
}

$gClass=21;

switch ($gPro){
 case "55":
$ids="二肖连中";
$Types="二肖中";
$order="A";
$usds=22;
break;
 case "56":
$ids="三肖连中";
$Types="三肖中";
$order="A";
$usds=22;
break;
 case "57":
$ids="四肖连中";
$Types="四肖中";
$order="A";
$usds=22;

break;
 case "58":
$ids="二肖连不中";
$Types="二肖不中";
$order="A";
$usds=22;
break;
 case "59":
$ids="三肖连不中";
$Types="三肖不中";
$order="A";
$usds=22;
break;
 case "60":
$ids="四肖连不中";
$Types="四肖不中";
$order="A";
$usds=22;
break;
}

$orderListType = "duplex";

$douMode=0;
$totNum=12;
$Type="生肖連";
//$gPro=1;
$lmm=1;
$class=0;
$scorB=0;
$sAmtTxt=1;
$titOrderType="";
$menuTabNum=2;
//$gMode=0;
$orderMode=2;
$ckAgEarnActi=0;
$diffClass=0;


break;

case "tailLm":

 if ($_GET['gPro']!=""){
$gPro=$_GET['gPro'];
}else{
$gPro=64;
}

$gClass=22;

switch ($gPro){
 case "64":
$ids="二尾连中";
$Types="二尾中";
$order="A";
$usds=23;
break;
 case "65":
$ids="三尾连中";
$Types="三尾中";
$order="A";
$usds=23;
break;
 case "66":
$ids="四尾连中";
$Types="四尾中";
$order="A";
$usds=23;

break;
 case "67":
$ids="二尾连不中";
$Types="二尾不中";
$order="A";
$usds=23;
break;
 case "68":
$ids="三尾连不中";
$Types="三尾不中";
$order="A";
$usds=23;
break;
 case "69":
$ids="四尾连不中";
$Types="四尾不中";
$order="A";
$usds=23;
break;
}

$orderListType = "duplex";

$douMode=0;
$totNum=10;
$Type="尾數連";
//$gPro=1;
$lmm=1;
$class=0;
$scorB=0;
$sAmtTxt=1;
$titOrderType="";
$menuTabNum=2;
//$gMode=0;
$orderMode=2;
$ckAgEarnActi=0;
$diffClass=0;


break;

case "hit":
 if ($_GET['gClass']!=""){
$gClass=$_GET['gClass'];
}else{
$gClass=30;
}
switch ($gClass){
 case "30":
$ids="五中一";
$Types="五中一";
$order="A";
$usds=31;
break;
 case "31":
$ids="六中一";
$Types="六中一";
$order="A";
$usds=32;
break;
 case "32":
$ids="七中一";
$Types="七中一";
$order="A";
$usds=33;

break;
 case "33":
$ids="八中一";
$Types="八中一";
$order="A";
$usds=34;
break;
 case "34":
$ids="九中一";
$Types="九中一";
$order="A";
$usds=35;
break;
 case "35":
$ids="十中一";
$Types="十中一";
$order="A";
$usds=36;
break;
}
if($gMode==1){
$douMode=1;
$orderListType = "multi";
}else{
$douMode=0;
$orderListType = "duplex";
}
$totNum=49;
$Type="多選中一";
$gPro=1;
$lmm=0;
$class=0;
$scorB=0;
$sAmtTxt=1;
$titOrderType="";
$menuTabNum=2;
$gMode=0;
$orderMode=2;
$ckAgEarnActi=0;
$diffClass=0;


break;

case "want":
 if ($_GET['gClass']!=""){
$gClass=$_GET['gClass'];
}else{
$gClass=38;
}
switch ($gClass){
 case "38":
$ids="一粒任中";
$Types="一粒任中";
$order="A";
$usds=39;
break;
 case "39":
$ids="二粒任中";
$Types="二粒任中";
$order="A";
$usds=40;
break;
 case "40":
$ids="三粒任中";
$Types="三粒任中";
$order="A";
$usds=41;

break;
 case "41":
$ids="四粒任中";
$Types="四粒任中";
$order="A";
$usds=42;
break;
 case "42":
$ids="五粒任中";
$Types="五粒任中";
$order="A";
$usds=43;
break;
}
if($gMode==1){
$douMode=1;
$orderListType = "multi";
}else{
$douMode=0;
$orderListType = "duplex";
}
$totNum=49;
$Type="特平中";
$gPro=1;
$lmm=0;
$class=0;
$scorB=0;
$sAmtTxt=1;
$titOrderType="";
$menuTabNum=2;
$gMode=0;
$orderMode=2;
$ckAgEarnActi=0;
$diffClass=0;


break;
}

include "./h/h_hit.php";

if($class==1){
$Rate=RateSt($ids,$user [0] ['abcd']);
}elseif($class==2){
$Rate=RateSgg($ids,$user [0] ['abcd']);
}else{
$Rate=RateS($ids,$user [0] ['abcd']);
}

$userds = getEdit ( $user [0] ['id'], 1,$user[0]['abcd'] );

?>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <title><?php if($_GET['gMode']==0){echo "复式-";}else if($_GET['gMode']==1){echo "多组-";}?><?php echo iconv('GB2312', 'UTF-8', $ids);?>盘</title>
    <link rel="stylesheet" href="./plugin/seedsui/seedsui.min.css">
	<style type="text/css">
		.config_block button{
			width:30%;
			margin:10px 1.65%;
			float:left;
		}
		.config_block:after{
			display:table;
			content:"";
			clear:both;
		}

		.ball {
			margin-top: 5px;
			margin-left: 50px;
			float: left;
			width: 21px;
			height: 21px;
			background: transparent url(images/balls.png) no-repeat scroll 0 -38px;
			color: red；
			font: 700 14px/21px Verdana;
			text-align: center;
			line-height: 21px
		}
		
		*{padding: 0; margin: 0}  
        .box{  
            position: fixed;  
            width: 100%;  
            height: 100%;  
            background: red;  
            display: none;  
        }  
        .box1{  
		background: red;
            width: 100%;  
            height: 100%;  
            position: fixed;left: 0%; top: 0%;  
             
            border: 1px solid #000000;  
        }  
		
		.dvNoB{position:relative;font: 700 14px/21px Verdana;text-align: center;width: 30px;height:26px;overflow:hidden;font-size:18px;color:#ffffff;background:url('images/ball.gif') no-repeat center 0px;}
		.dvNoR{position:relative;font: 700 14px/21px Verdana;text-align: center;width: 30px;height:26px;overflow:hidden;font-size:18px;color:#ffffff;background:url('images/ball.gif') no-repeat center -26px;}
		.dvNoG{position:relative;font: 700 14px/21px Verdana;text-align: center;width: 30px;height:26px;overflow:hidden;font-size:18px;color:#ffffff;background:url('images/ball.gif') no-repeat center -52px;}
	</style>
</head>

<body ontouchstart="">
    	<header>
            <div class="titlebar reverse">
                <a href="javascript:location.href='index.php'"><i class="icon icon-arrowleft"></i></a>
                <h1><?php if($_GET['gMode']==0){echo "复式-";}else if($_GET['gMode']==1){echo "多组-";}?><?php echo iconv('GB2312', 'UTF-8', $ids);?>盘</h1>
				<select onchange="window.location=this.value;">
				<option value="#">选择游戏</option>
				<option value="gMain_sp.php">特码</option>
				<option value="gMain_num.php">正碼</option>
				<option value="gMain_numSp.php?gItem=numSp&gClass=10">正碼特</option>
				<option value="gMain_lm.php?gItem=lm&gClass=4&gPro=41&gMode=0">連碼</option>
				<option value="gMain_diff.php?gItem=diff&gClass=9">過關</option>
				<option value="gMain_spOth.php?gItem=spOth&gClass=8">特碼項</option>
				<option value="gMain_twOth.php?gItem=twOth&gClass=19">總肖項</option>
				<option value="gMain_numOth.php?gItem=numOth&gClass=16">總數</option>
				<option value="gMain_tw6.php?gItem=tw6&gClass=18&gPro=52">六肖</option>
				<option value="gMain_not.php??gItem=not&gClass=20&gPro=1&gMode=0">多選不中</option>
				<option value="gMain_twLm.php?gItem=twLm&gClass=21&gPro=55&gMode=0">生肖連</option>
				<option value="gMain_tailLm.php?gItem=tailLm&gClass=22&gPro=64&gMode=0">尾數連</option>
				<option value="gMain_hit.php?gItem=hit&gClass=30&gPro=1&gMode=0">多選中一</option>
				<option value="gMain_want.php?gItem=want&gClass=38&gPro=&gMode=0">特平中</option>
				</select>
            </div>
        </header>
    	<article>
		
		<article>
			<div class="config_block">
				<button class="button radiusround outline height32" onclick="location='?gItem=hit&gClass=30&gPro=1&gMode=0'">复式-五中一</button>
				<button class="button radiusround outline height32" onclick="location='?gItem=hit&gClass=31&gPro=1&gMode=0'">复式-六中一</button>
				<button class="button radiusround outline height32" onclick="location='?gItem=hit&gClass=32&gPro=1&gMode=0'">复式-七中一</button>
				<button class="button radiusround outline height32" onclick="location='?gItem=hit&gClass=33&gPro=1&gMode=0'">复式-八中一</button>
				<button class="button radiusround outline height32" onclick="location='?gItem=hit&gClass=34&gPro=1&gMode=0'">复式-九中一</button>
				<button class="button radiusround outline height32" onclick="location='?gItem=hit&gClass=35&gPro=1&gMode=0'">复式-十中一</button>
				<button class="button radiusround outline height32" onclick="location='?gItem=hit&gClass=30&gPro=1&gMode=1'">多组-五中一</button>
				<button class="button radiusround outline height32" onclick="location='?gItem=hit&gClass=31&gPro=1&gMode=1'">多组-六中一</button>
				<button class="button radiusround outline height32" onclick="location='?gItem=hit&gClass=32&gPro=1&gMode=1'">多组-七中一</button>
				<button class="button radiusround outline height32" onclick="location='?gItem=hit&gClass=33&gPro=1&gMode=1'">多组-八中一</button>
				<button class="button radiusround outline height32" onclick="location='?gItem=hit&gClass=34&gPro=1&gMode=1'">多组-九中一</button>
				<button class="button radiusround outline height32" onclick="location='?gItem=hit&gClass=35&gPro=1&gMode=1'">多组-十中一</button>
			</div>
		</article>
		
    		<div class="group">
    			<ul class="list between noclick">
    				<li class="noborder" style="background-color:#f9f9f9;">
    					<div class="card-handler tbpadding8 border" data-col="1">
							<a>
								<span>号码</span>
							</a>
							<a>
								<span>赔率</span>
							</a>
							<a>
								<span>选择</span>
							</a>
    					</div>
    				</li>
					
					<?php for ($i=0;$i<49;$i++){?>
					<li class="noborder" style="background-color:#ffffff;" onclick="xuanzhong('<?php echo $Rate[$i]['rate'];?>','<?php if ($i<9){echo "0".$Rate[$i]['class3'];}else{echo $Rate[$i]['class3'];}?>','<?php echo $i;?>')">
    					<div class="card-handler tbpadding8" data-col="1" style="border-bottom:1px solid #d4dde4;">
							<a>
								<span class='dvNo<?php echo Color_t($Rate[$i]['class3']);?>' style="color:#fff;"><?php if ($i<9){echo "0".$Rate[$i]['class3'];}else{echo $Rate[$i]['class3'];}?></span>
							</a>
							<a>
								<span id='showRate_0' style="color:red"><B><?php echo $Rate[$i]['rate'];?></B></span>
							</a>
							<a>
									<span>
									<div id="xuanze_<?php echo $i;?>"></div>
									<!--input type='text' class='rare' id=amount_<?php echo $i;?> name=amount_<?php echo $i;?> value='' style="width:50px;height: 12px;"-->
									<input type=hidden name=id_<?php echo $i;?> value='<?php echo $Rate[$i]['id'];?>'>
									<input type=hidden name=no_<?php echo $i;?> value='<?php if ($i<9){echo "0".$Rate[$i]['class3'];}else{echo $Rate[$i]['class3'];}?>'>
									<input type=hidden name=rate_<?php echo $i;?> value='<?php echo $Rate[$i]['rate'];?>'>
									
									<input type=hidden name=ball_<?php echo $i;?> value='<?php if ($i<9){echo "0".$Rate[$i]['class3'];}else{echo $Rate[$i]['class3'];}?>'>
									</span>
							</a>
    					</div>
    				</li>
					<?php }?>
					
    			</ul>
    		</div>
    		
			<div style="text-align:center;margin-bottom:15px;">
			单注金额:<input type='text' class='rare' id=amount name=amount value='' style="width:60%;height: 12px;">
									
			</div>
			
			<div style="text-align:center;margin-bottom:15px;">
				<button class="button radius4 submit" style="width:48%" onClick="ckOrderInfo();">
					<i class="icon icon-rdohook"></i>
					<label>提交</label>
				</button>
				
				<button class="button radius4 cancel" style="width:48%" onClick="cleanjine();">
					<i class="icon icon-clear"></i>
					<label>取消</label>
				</button>
			</div> 
			
        </article>
    <script src="./plugin/jquery/jquery.min.js"></script>
    <script src="./plugin/seedsui/seedsui.min.js"></script>
	<script src="./layer/layer.js"></script>
    <script type="text/javascript">
	var gxuanzhong_num = 0;
	var gmode1xuanzhong_num = 1;
	var gmode1xuanzhong_str = new Array();
	gmode1xuanzhong_str[0] = "";
	gmode1xuanzhong_str[1] = "";
	gmode1xuanzhong_str[2] = "";
	gmode1xuanzhong_str[3] = "";
	gmode1xuanzhong_str[4] = "";
	
	var gmode1xuanzhong_peilv = new Array();
	gmode1xuanzhong_peilv[0] = "";
	gmode1xuanzhong_peilv[1] = "";
	gmode1xuanzhong_peilv[2] = "";
	gmode1xuanzhong_peilv[3] = "";
	gmode1xuanzhong_peilv[4] = "";
	
	var gmode1xuanzhong_id = new Array();
	gmode1xuanzhong_id[0] = "";
	gmode1xuanzhong_id[1] = "";
	gmode1xuanzhong_id[2] = "";
	gmode1xuanzhong_id[3] = "";
	gmode1xuanzhong_id[4] = "";
	
	var bqiuhao = new Array();
	var bpeilv = new Array();
	
	var gItem = "<?php echo $gitem;?>";
  var gClass = <?php echo $gClass;?>;
  var gPro = <?php echo $gPro;?>;
  var gMode = <?php echo $_GET['gMode'];?>;
  var douMode = <?php echo $douMode;?>;
  var sMode = <?php echo $sMode;?>;
  var sysMode = 0;
  var sAmtTxt = <?php echo $sAmtTxt;?>;
  var orderAB = "<?php echo $user [0] ['abcd'];?>";
  var scoreAB = 0;
  var g_twlmNum = 8;
  var titOrderType= "<?php echo $titOrderType;?>";
  var titName = "<?php echo $Types;?>";
  var menuTabNum = "<?php echo $menuTabNum;?>";
  var gOrderId = "<?php echo $clientid;?>";
  var gReOrderCode = 0;
  var gReOrderStr = "";
  var gReSpRate = 0;
  var getInfo = 1;
  var tr = 0;
  var tr2 = 0;
  var reTurnData = 1;
  var stGame = 0;
  var betActi = 0;
  var chRate = new Array();
  var datetime = "";
  var spCustDiffActi = 0;
  var setDetValue = 0;
  var setBallStr = "";
  var orderListType = "<?php echo $orderListType;?>";
  var headStr = "";    
  var tailStr = "";
  var douStr = "";
  var douShowName = "";
  var orderReSec = 10;
  var orderReCode = 0;
  
  function xuanzhong(peilv,num,id){
	  if(gMode == 0)
	{	
	  if($("#xuanze_"+id).html() == '')
	  {
		  if(gClass == 30)
		  {
			  if(gxuanzhong_num < 8)
				{
					gxuanzhong_num++;
					$("#xuanze_"+id).html('<i class="icon icon-flag-fill" style="color:green"></i>');
				}
				else
				{
					layer.alert("最多只能勾選8顆球號!");
				}
		  }
		  else if(gClass == 31)
		  {
			  if(gxuanzhong_num < 9)
				{
					gxuanzhong_num++;
					$("#xuanze_"+id).html('<i class="icon icon-flag-fill" style="color:green"></i>');
				}
				else
				{
					layer.alert("最多只能勾選9顆球號!");
				}
		  }
		  else if(gClass == 32)
		  {
			  if(gxuanzhong_num < 10)
				{
					gxuanzhong_num++;
					$("#xuanze_"+id).html('<i class="icon icon-flag-fill" style="color:green"></i>');
				}
				else
				{
					layer.alert("最多只能勾選10顆球號!");
				}
		  }
		  else if(gClass == 33)
		  {
			  if(gxuanzhong_num < 10)
				{
					gxuanzhong_num++;
					$("#xuanze_"+id).html('<i class="icon icon-flag-fill" style="color:green"></i>');
				}
				else
				{
					layer.alert("最多只能勾選10顆球號!");
				}
		  }
		  else if(gClass == 34)
		  {
			  if(gxuanzhong_num < 11)
				{
					gxuanzhong_num++;
					$("#xuanze_"+id).html('<i class="icon icon-flag-fill" style="color:green"></i>');
				}
				else
				{
					layer.alert("最多只能勾選10顆球號!");
				}
		  }
		  else if(gClass == 35)
		  {
			  if(gxuanzhong_num < 12)
				{
					gxuanzhong_num++;
					$("#xuanze_"+id).html('<i class="icon icon-flag-fill" style="color:green"></i>');
				}
				else
				{
					layer.alert("最多只能勾選10顆球號!");
				}
		  }
	  }
	  else
	  {

		  gxuanzhong_num--;
		  $("#xuanze_"+id).html('');
		
	  }
	}
	
	else if(gMode == 1)
	{
		if(gClass == 30)
		{
			if(bqiuhao.length < 5)
			{
				if(gmode1xuanzhong_num < 6)
				{
					if($("#xuanze_"+id).html() == "")
					{
						gmode1xuanzhong_num++;
						$("#xuanze_"+id).html('<i class="icon icon-flag-fill" style="color:green"></i>');
					}
					else
					{
						gmode1xuanzhong_num--;
						$("#xuanze_"+id).html('');
					}
				}
				
				if(gmode1xuanzhong_num == 6)
				{
					if($("#xuanze_"+id).html() == "")
					{
						$("#xuanze_"+id).html('<i class="icon icon-flag-fill" style="color:green"></i>');
					}
					
					
					
					bbbIdStr = "";
					bbbRateStr = "";
					for(var i=0;i<49;i++){
						if($("#xuanze_"+i).html() != "")
						{
						bgBall = document.getElementsByName("ball_"+i)[0].value;
						bgId = document.getElementsByName("id_"+i)[0].value;
						bgRate = document.getElementsByName("rate_"+i)[0].value;
						
						if(bbbIdStr !="")bbbIdStr += ","+bgBall;
						else bbbIdStr += bgBall;
						if(bbbRateStr !="")bbbRateStr += ","+bgRate;
						else bbbRateStr += bgRate;
						}
					}
					
					for(var i=0;i<49;i++){
						$("#xuanze_"+i).html('');
					}
					
					bqiuhao.push(bbbIdStr);
					bpeilv.push(bbbRateStr);
			
					var layerstr = "";
						$.each(bqiuhao, function(idx, obj) {
					
						layerstr += obj+"<br>";
					});
				
					layer.alert("最多勾选5组球号<br>已勾选"+bqiuhao.length+"组<br>"+layerstr);
					
					gmode1xuanzhong_num = 1;
				}
			}
			else
			{
				var layerstr = "";
				$.each(bqiuhao, function(idx, obj) {
					
					layerstr += obj+"<br>";
				});
				
				layer.alert("最多勾选5组球号<br>已勾选"+bqiuhao.length+"组<br>"+layerstr);
			}
		}
		else if(gClass == 31)
		{
			if(bqiuhao.length < 5)
			{
				if(gmode1xuanzhong_num < 7)
				{
					if($("#xuanze_"+id).html() == "")
					{
						gmode1xuanzhong_num++;
						$("#xuanze_"+id).html('<i class="icon icon-flag-fill" style="color:green"></i>');
					}
					else
					{
						gmode1xuanzhong_num--;
						$("#xuanze_"+id).html('');
					}
				}
				
				if(gmode1xuanzhong_num == 7)
				{
					if($("#xuanze_"+id).html() == "")
					{
						$("#xuanze_"+id).html('<i class="icon icon-flag-fill" style="color:green"></i>');
					}
					
					
					
					bbbIdStr = "";
					bbbRateStr = "";
					for(var i=0;i<49;i++){
						if($("#xuanze_"+i).html() != "")
						{
						bgBall = document.getElementsByName("ball_"+i)[0].value;
						bgId = document.getElementsByName("id_"+i)[0].value;
						bgRate = document.getElementsByName("rate_"+i)[0].value;
						
						if(bbbIdStr !="")bbbIdStr += ","+bgBall;
						else bbbIdStr += bgBall;
						if(bbbRateStr !="")bbbRateStr += ","+bgRate;
						else bbbRateStr += bgRate;
						}
					}
					
					for(var i=0;i<49;i++){
						$("#xuanze_"+i).html('');
					}
					
					bqiuhao.push(bbbIdStr);
					bpeilv.push(bbbRateStr);
			
					var layerstr = "";
						$.each(bqiuhao, function(idx, obj) {
					
						layerstr += obj+"<br>";
					});
				
					layer.alert("最多勾选5组球号<br>已勾选"+bqiuhao.length+"组<br>"+layerstr);
					
					gmode1xuanzhong_num = 1;
				}
			}
			else
			{
				var layerstr = "";
				$.each(bqiuhao, function(idx, obj) {
					
					layerstr += obj+"<br>";
				});
				
				layer.alert("最多勾选5组球号<br>已勾选"+bqiuhao.length+"组<br>"+layerstr);
			}
		}
		else if(gClass == 32)
		{
			if(bqiuhao.length < 5)
			{
				if(gmode1xuanzhong_num < 8)
				{
					if($("#xuanze_"+id).html() == "")
					{
						gmode1xuanzhong_num++;
						$("#xuanze_"+id).html('<i class="icon icon-flag-fill" style="color:green"></i>');
					}
					else
					{
						gmode1xuanzhong_num--;
						$("#xuanze_"+id).html('');
					}
				}
				
				if(gmode1xuanzhong_num == 8)
				{
					if($("#xuanze_"+id).html() == "")
					{
						$("#xuanze_"+id).html('<i class="icon icon-flag-fill" style="color:green"></i>');
					}
					
					
					
					bbbIdStr = "";
					bbbRateStr = "";
					for(var i=0;i<49;i++){
						if($("#xuanze_"+i).html() != "")
						{
						bgBall = document.getElementsByName("ball_"+i)[0].value;
						bgId = document.getElementsByName("id_"+i)[0].value;
						bgRate = document.getElementsByName("rate_"+i)[0].value;
						
						if(bbbIdStr !="")bbbIdStr += ","+bgBall;
						else bbbIdStr += bgBall;
						if(bbbRateStr !="")bbbRateStr += ","+bgRate;
						else bbbRateStr += bgRate;
						}
					}
					
					for(var i=0;i<49;i++){
						$("#xuanze_"+i).html('');
					}
					
					bqiuhao.push(bbbIdStr);
					bpeilv.push(bbbRateStr);
			
					var layerstr = "";
						$.each(bqiuhao, function(idx, obj) {
					
						layerstr += obj+"<br>";
					});
				
					layer.alert("最多勾选5组球号<br>已勾选"+bqiuhao.length+"组<br>"+layerstr);
					
					gmode1xuanzhong_num = 1;
				}
			}
			else
			{
				var layerstr = "";
				$.each(bqiuhao, function(idx, obj) {
					
					layerstr += obj+"<br>";
				});
				
				layer.alert("最多勾选5组球号<br>已勾选"+bqiuhao.length+"组<br>"+layerstr);
			}
		}
		else if(gClass == 33)
		{
			if(bqiuhao.length < 5)
			{
				if(gmode1xuanzhong_num < 9)
				{
					if($("#xuanze_"+id).html() == "")
					{
						gmode1xuanzhong_num++;
						$("#xuanze_"+id).html('<i class="icon icon-flag-fill" style="color:green"></i>');
					}
					else
					{
						gmode1xuanzhong_num--;
						$("#xuanze_"+id).html('');
					}
				}
				
				if(gmode1xuanzhong_num == 9)
				{
					if($("#xuanze_"+id).html() == "")
					{
						$("#xuanze_"+id).html('<i class="icon icon-flag-fill" style="color:green"></i>');
					}
					
					
					
					bbbIdStr = "";
					bbbRateStr = "";
					for(var i=0;i<49;i++){
						if($("#xuanze_"+i).html() != "")
						{
						bgBall = document.getElementsByName("ball_"+i)[0].value;
						bgId = document.getElementsByName("id_"+i)[0].value;
						bgRate = document.getElementsByName("rate_"+i)[0].value;
						
						if(bbbIdStr !="")bbbIdStr += ","+bgBall;
						else bbbIdStr += bgBall;
						if(bbbRateStr !="")bbbRateStr += ","+bgRate;
						else bbbRateStr += bgRate;
						}
					}
					
					for(var i=0;i<49;i++){
						$("#xuanze_"+i).html('');
					}
					
					bqiuhao.push(bbbIdStr);
					bpeilv.push(bbbRateStr);
			
					var layerstr = "";
						$.each(bqiuhao, function(idx, obj) {
					
						layerstr += obj+"<br>";
					});
				
					layer.alert("最多勾选5组球号<br>已勾选"+bqiuhao.length+"组<br>"+layerstr);
					
					gmode1xuanzhong_num = 1;
				}
			}
			else
			{
				var layerstr = "";
				$.each(bqiuhao, function(idx, obj) {
					
					layerstr += obj+"<br>";
				});
				
				layer.alert("最多勾选5组球号<br>已勾选"+bqiuhao.length+"组<br>"+layerstr);
			}
		}
		else if(gClass == 34)
		{
			if(bqiuhao.length < 5)
			{
				if(gmode1xuanzhong_num < 10)
				{
					if($("#xuanze_"+id).html() == "")
					{
						gmode1xuanzhong_num++;
						$("#xuanze_"+id).html('<i class="icon icon-flag-fill" style="color:green"></i>');
					}
					else
					{
						gmode1xuanzhong_num--;
						$("#xuanze_"+id).html('');
					}
				}
				
				if(gmode1xuanzhong_num == 10)
				{
					if($("#xuanze_"+id).html() == "")
					{
						$("#xuanze_"+id).html('<i class="icon icon-flag-fill" style="color:green"></i>');
					}
					
					
					
					bbbIdStr = "";
					bbbRateStr = "";
					for(var i=0;i<49;i++){
						if($("#xuanze_"+i).html() != "")
						{
						bgBall = document.getElementsByName("ball_"+i)[0].value;
						bgId = document.getElementsByName("id_"+i)[0].value;
						bgRate = document.getElementsByName("rate_"+i)[0].value;
						
						if(bbbIdStr !="")bbbIdStr += ","+bgBall;
						else bbbIdStr += bgBall;
						if(bbbRateStr !="")bbbRateStr += ","+bgRate;
						else bbbRateStr += bgRate;
						}
					}
					
					for(var i=0;i<49;i++){
						$("#xuanze_"+i).html('');
					}
					
					bqiuhao.push(bbbIdStr);
					bpeilv.push(bbbRateStr);
			
					var layerstr = "";
						$.each(bqiuhao, function(idx, obj) {
					
						layerstr += obj+"<br>";
					});
				
					layer.alert("最多勾选5组球号<br>已勾选"+bqiuhao.length+"组<br>"+layerstr);
					
					gmode1xuanzhong_num = 1;
				}
			}
			else
			{
				var layerstr = "";
				$.each(bqiuhao, function(idx, obj) {
					
					layerstr += obj+"<br>";
				});
				
				layer.alert("最多勾选5组球号<br>已勾选"+bqiuhao.length+"组<br>"+layerstr);
			}
		}
		else if(gClass == 35)
		{
			if(bqiuhao.length < 5)
			{
				if(gmode1xuanzhong_num < 11)
				{
					if($("#xuanze_"+id).html() == "")
					{
						gmode1xuanzhong_num++;
						$("#xuanze_"+id).html('<i class="icon icon-flag-fill" style="color:green"></i>');
					}
					else
					{
						gmode1xuanzhong_num--;
						$("#xuanze_"+id).html('');
					}
				}
				
				if(gmode1xuanzhong_num == 11)
				{
					if($("#xuanze_"+id).html() == "")
					{
						$("#xuanze_"+id).html('<i class="icon icon-flag-fill" style="color:green"></i>');
					}
					
					
					
					bbbIdStr = "";
					bbbRateStr = "";
					for(var i=0;i<49;i++){
						if($("#xuanze_"+i).html() != "")
						{
						bgBall = document.getElementsByName("ball_"+i)[0].value;
						bgId = document.getElementsByName("id_"+i)[0].value;
						bgRate = document.getElementsByName("rate_"+i)[0].value;
						
						if(bbbIdStr !="")bbbIdStr += ","+bgBall;
						else bbbIdStr += bgBall;
						if(bbbRateStr !="")bbbRateStr += ","+bgRate;
						else bbbRateStr += bgRate;
						}
					}
					
					for(var i=0;i<49;i++){
						$("#xuanze_"+i).html('');
					}
					
					bqiuhao.push(bbbIdStr);
					bpeilv.push(bbbRateStr);
			
					var layerstr = "";
						$.each(bqiuhao, function(idx, obj) {
					
						layerstr += obj+"<br>";
					});
				
					layer.alert("最多勾选5组球号<br>已勾选"+bqiuhao.length+"组<br>"+layerstr);
					
					gmode1xuanzhong_num = 1;
				}
			}
			else
			{
				var layerstr = "";
				$.each(bqiuhao, function(idx, obj) {
					
					layerstr += obj+"<br>";
				});
				
				layer.alert("最多勾选5组球号<br>已勾选"+bqiuhao.length+"组<br>"+layerstr);
			}
		}
	}
  }
  
  function cleanjine()
  {
	  if(gMode == 0)
	{
	  gxuanzhong_num = 0;
	  
	  for(var i=0;i<49;i++){
		if($("#xuanze_"+i).html() != '')
	  {
		  $("#xuanze_"+i).html('');
	  }
				
			}
	}
	else if(gMode == 1)
	{
		bqiuhao.length = 0;
		bpeilv.length = 0; 
		
		gmode1xuanzhong_str[0]="";
		gmode1xuanzhong_str[1]="";
		gmode1xuanzhong_peilv[0]="";
		gmode1xuanzhong_peilv[1]="";
	}
  }
  
  function ckOrderInfo()
  {		
	if(gMode == 0)
	{
		if(gClass == 30)
		{
			if(gxuanzhong_num <5)
			{
				layer.alert("請勾選5~8顆球號");
				return false;
			}
		}
		else if(gClass == 31)
		{
			if(gxuanzhong_num <6)
			{
				layer.alert("請勾選6~9顆球號");
				return false;
			}
		}
		else if(gClass == 32)
		{
			if(gxuanzhong_num <7)
			{
				layer.alert("請勾選7~10顆球號");
				return false;
			}
		}
		else if(gClass == 33)
		{
			if(gxuanzhong_num <8)
			{
				layer.alert("請勾選8~10顆球號");
				return false;
			}
		}
		else if(gClass == 34)
		{
			if(gxuanzhong_num <9)
			{
				layer.alert("請勾選9~11顆球號");
				return false;
			}
		}
		else if(gClass == 35)
		{
			if(gxuanzhong_num <10)
			{
				layer.alert("請勾選10~12顆球號");
				return false;
			}
		}
	}
	
	else if(gMode ==1)
	{

			if(bqiuhao.length ==0)
			{
				layer.alert("請勾選球號");
				return false;
			}


	}
	
	
	
  
			
			gBallStr = "";
			gxuanze = "";
			gIdStr = "";
			gRateStr = "";
			gAmtStr = "";
			gbetlist = "";
			gAmt = document.getElementsByName("amount")[0].value;
			
			if(gMode == 0)
		{
			
			for(var i=0;i<49;i++){
				gxuanze = $("#xuanze_"+i).html();
				if(gxuanze != "")
				{
				gBall = document.getElementsByName("ball_"+i)[0].value;
				gId = document.getElementsByName("id_"+i)[0].value;
				gRate = document.getElementsByName("rate_"+i)[0].value;
				//gAmt = document.getElementsByName("amount_"+i)[0].value;
			
				var re = /\d+$/;
				if (re.test(gAmt) && gAmt >= 2)
				{
					
						if(gBallStr !="")gBallStr += ","+gBall;
						else gBallStr += gBall;
						
					if(gIdStr !="")gIdStr += ","+gId;
						else gIdStr += gId;
					if(gRateStr !="")gRateStr += ","+gRate;
						else gRateStr += gRate;
					//if(gAmtStr !="")gAmtStr += "|"+gAmt;
						//else gAmtStr += gAmt;
						gAmtStr = gAmt;
						
					gbetlist += "球号："+gBall+" 赔率："+gRate+" 金额："+gAmt + "<br>";
					
					
				}
				}
			}
		}
		else if(gMode == 1)
		{
			
				$.each(bqiuhao, function(idx, obj) {
					
				if(gBallStr !="")gBallStr += "|"+obj;
						else gBallStr += obj;
				});
				
				$.each(bpeilv, function(idx, obj) {
					
					if(gRateStr !="")gRateStr += "|"+obj;
						else gRateStr += obj;
				});
				
				gAmtStr = gAmt;
				
				
				gbetlist = "球号："+gBallStr+" <br>赔率："+gRateStr+" <br>金额："+gAmt + "<br>";
				
				 gIdStr = "123";
		}
			
			if(gIdStr !="")
			{
				orderStr = gBallStr+"@"+gRateStr+"@"+gAmtStr;
	  
			layer.confirm(gbetlist, {
				btn: ['下单','取消'] //按钮
			}, function(){
				
				str = "";
				if(gMode == 0)
				{
					str+= "hit"+"@"+gClass+"@"+"1"+"@"+gOrderId+"@"+gMode+"@"+douMode+"@"+sysMode+"@"+orderStr;
					
				}
				else if(gMode == 1)
				{
					str+= "hit"+"@"+gClass+"@"+"1"+"@"+gOrderId+"@0@"+douMode+"@"+sysMode+"@"+orderStr;
					
				}
						$.ajax({
							type: "GET",
							url: "gOrderB.php?gStr="+str+"&time="+(new Date().getTime()),
							dataType: "text",
							success: function(msg) {
								orderState(msg);
							
							}
						});
  
  
}, function(){
  
});

			}
		}
		
		
		function orderState(str){
    orderReCode = 1; 
    infoArr = str.split("`");
    endState = infoArr[0];

    if(endState=="ok"){
      gOrderId = infoArr[1];
      oStr = infoArr[2];
      gReOrderStr = infoArr[3];
      gReSpRate = infoArr[4];
      
	  resultArr = oStr.split("##");
	  resultlistArr = "<font color=red>下单成功</font><br>注单号："+gOrderId+"<br>";
	  for(var i=0;i<resultArr.length;i++)
	  {
		  resultArrnode = resultArr[i].split("|");
		  if(resultArrnode != "")
		  {
				if(gMode == 0)
				{
					resultlistArr += "球号："+ resultArrnode[0] +" <br>赔率："+ resultArrnode[1] +" <br>组合："+ resultArrnode[2] +" <br>金额："+ resultArrnode[2]*resultArrnode[3];
				}
				else if(gMode == 1)
				{
					
					resultlistArr += "<br>球号："+ resultArrnode[0] +" <br>赔率："+ resultArrnode[1] +" <br>金额："+ resultArrnode[2];
				
				}
		  }
	  }
	  
	  bqiuhao.length = 0;
		bpeilv.length = 0; 
		
		gmode1xuanzhong_id[0]="";
		gmode1xuanzhong_id[1]="";
		gmode1xuanzhong_id[2]="";
		gmode1xuanzhong_id[3]="";
		gmode1xuanzhong_id[4]="";
		
		gmode1xuanzhong_str[0]="";
		gmode1xuanzhong_str[1]="";
		gmode1xuanzhong_str[2]="";
		gmode1xuanzhong_str[3]="";
		gmode1xuanzhong_str[4]="";
		
		gmode1xuanzhong_peilv[0]="";
		gmode1xuanzhong_peilv[1]="";
		gmode1xuanzhong_peilv[2]="";
		gmode1xuanzhong_peilv[3]="";
		gmode1xuanzhong_peilv[4]="";
		
		gmode1xuanzhong_num =1;
	  
	  layer.alert(resultlistArr);
    }else{ 
      if(endState=="err1"){
        alert("此項目未開放!");
      }else if(endState=="err2"){
        alert("會員資料已修改,請重新登入!");
      }else if(endState=="err3"){
        alert("請檢查下注狀況,確認是否有重覆下注!");
      }else if(endState=="err4"){
        alert("資料錯誤!");
      }else if(endState=="err5"){
	parent.location = 'logout.php';
      }else if(endState=="err6"){
        alert("此帳號已被停用,請聯絡上級管理!");
	parent.location = 'logout.php';
      }else if(endState=="err7"){
        alert("此帳號已被停押,只能查帳,不能投注!");
	window.location.replace(location.href);
      }else{
        alert("資料錯誤!");
      }

    }
  }


	function showSinOrder(bianhao,qiuhao,i,peilv)
    {
        $(document).ready(function() {
    
			layer.prompt({
				title: '投注' + qiuhao + '号球，赔率' + peilv + ',请输入金额：',
				formType: 0 
				}, function(pass){
					var re = /\d+$/;
					if (!re.test(pass))
					{
						alert("請輸入金額");
					}
					else{
						if(pass >= 2)
						{
						str = "";
						str+= "sp"+"@"+"1"+"@"+"1"+"@"+gOrderId+"@"+gMode+"@"+douMode+"@"+sysMode+"@"+bianhao+"@"+peilv+"@"+pass;
						
						$.ajax({
							type: "GET",
							url: "gOrderA.php?gStr="+str+"&time="+(new Date().getTime()),
							dataType: "text",
							success: function(msg) {
								orderState(msg);
							}
						});
						}
						else
						{
							alert("单注最低2");
						}
					}
				});
			});
		}
	
	
      function check(evt){
        var keycode = evt.keyCode;
        if(keycode==13 && sAmtTxt==1)form1.ckOrder.click(); //ckOrderInfo('dou');
        else return false;
      }

      var cstr1 = "01,02,07,08,12,13,18,19,23,24,29,30,34,35,40,45,46";
      var cstr2 = "03,04,09,10,14,15,20,25,26,31,36,37,41,42,47,48";
      var cstr3 = "05,06,11,16,17,21,22,27,28,32,33,38,39,43,44,49";
      var diffColor = 0;
      var diffClass = <?php echo $diffClass;?>;
      var orderMode = <?php echo $orderMode;?>;
      var g_twelve2 = new Array();
      var g_twelve = new Array();
      var g_tailData = new Array();
      var gTitNameArr = new Array();
      var spAgCustArr = new Array();
      var limitAmt = new Array();
      var ckAgEarnActi = <?php echo $ckAgEarnActi;?>;
      var agEarnArr = new Array();
g_twelve2[1] = '鼠';
g_twelve2[2] = '牛';
g_twelve2[3] = '虎';
g_twelve2[4] = '兔';
g_twelve2[5] = '龍';
g_twelve2[6] = '蛇';
g_twelve2[7] = '馬';
g_twelve2[8] = '羊';
g_twelve2[9] = '猴';
g_twelve2[10] = '雞';
g_twelve2[11] = '狗';
g_twelve2[12] = '豬';
<?php if($lmm==1 || $sMode==1){
?>
g_twelve[1] = '12,24,36,48';
g_twelve[2] = '11,23,35,47';
g_twelve[3] = '10,22,34,46';
g_twelve[4] = '09,21,33,45';
g_twelve[5] = '08,20,32,44';
g_twelve[6] = '07,19,31,43';
g_twelve[7] = '06,18,30,42';
g_twelve[8] = '05,17,29,41';
g_twelve[9] = '04,16,28,40';
g_twelve[10] = '03,15,27,39';
g_twelve[11] = '02,14,26,38';
g_twelve[12] = '01,13,25,37,49';


g_tailData[1] = '01,11,21,31,41';
g_tailData[2] = '02,12,22,32,42';
g_tailData[3] = '03,13,23,33,43';
g_tailData[4] = '04,14,24,34,44';
g_tailData[5] = '05,15,25,35,45';
g_tailData[6] = '06,16,26,36,46';
g_tailData[7] = '07,17,27,37,47';
g_tailData[8] = '08,18,28,38,48';
g_tailData[9] = '09,19,29,39,49';
g_tailData[10] = '10,20,30,40';

<?php 
}
?>
<?php if($gitem=="sp"){//特码?>
  var score_1 = '0/0';
  var score_1Arr = score_1.split('/');
  var score_3 = '0/0/0/0/0/0';
  var score_3Arr = score_3.split('/');
  var score_7 = '0/0/0/0';
  var score_7Arr = score_7.split('/');
agEarnArr[1] = 0;
agEarnArr[3] = 0;
agEarnArr[7] = 0;
<?php }elseif($gitem=="num"){//正吗?>
  var score_2 = '0/0';
  var score_2Arr = score_2.split('/');
  var score_3 = '0/0/0/0/0/0';
  var score_3Arr = score_3.split('/');
agEarnArr[2] = 0;
agEarnArr[3] = 0;
<?php }elseif($gitem=="numSp"){//正特?>
  var score_<?php echo $gClass;?> = '0';
  var score_<?php echo $gClass;?>Arr = score_<?php echo $gClass;?>.split('/');
  var score_3 = '0/0/0/0/0/0';
  var score_3Arr = score_3.split('/');
  var score_7 = '0/0/0/0';
  var score_7Arr = score_7.split('/');
agEarnArr[<?php echo $gClass;?>] = 0;
agEarnArr[3] = 0;
agEarnArr[7] = 0;
gTitNameArr[10]='正1特';
gTitNameArr[11]='正2特';
gTitNameArr[12]='正3特';
gTitNameArr[13]='正4特';
gTitNameArr[14]='正5特';
gTitNameArr[15]='正6特';
<?php }elseif($gitem=="lm"){//连码?>
  var score_4 = '0/0#0/0';
  var score_4Arr = score_4.split('/');
  var score_5 = '0/0#0';
  var score_5Arr = score_5.split('/');
limitAmt[41] = '<?php echo $userds[13]['mix'];?>|<?php echo $userds[13]['xx'];?>|<?php echo $userds[13]['xxx'];?>';
limitAmt[42] = '<?php echo $userds[13]['mix'];?>|<?php echo $userds[13]['xx'];?>|<?php echo $userds[13]['xxx'];?>';
limitAmt[43] = '<?php echo $userds[13]['mix'];?>|<?php echo $userds[13]['xx'];?>|<?php echo $userds[13]['xxx'];?>';
limitAmt[44] = '<?php echo $userds[10]['mix'];?>|<?php echo $userds[10]['xx'];?>|<?php echo $userds[10]['xxx'];?>';
limitAmt[45] = '<?php echo $userds[11]['mix'];?>|<?php echo $userds[11]['xx'];?>|<?php echo $userds[11]['xxx'];?>';
gTitNameArr[41]='二全中';
gTitNameArr[42]='二中特';
gTitNameArr[43]='特串';
gTitNameArr[44]='三全中';
gTitNameArr[45]='三中二';
<?php }elseif($gitem=="diff"){//过关?>
  var score_9 = '0';
  var score_9Arr = score_9.split('/');
<?php }elseif($gitem=="spOth"){//特吗项?>

  var score_<?php echo $gClass;?> = '0/0';
  var score_<?php echo $gClass;?>Arr = score_<?php echo $gClass;?>.split('/');
agEarnArr[<?php echo $gClass;?>] = 0;
gTitNameArr[8]='特肖';
gTitNameArr[17]='半波';
gTitNameArr[37]='五行';
  var score_19 = '0/0';
<?php }elseif($gitem=="twOth"){//特吗项?>
  var score_<?php echo $gClass;?> = '0/0';
  var score_<?php echo $gClass;?>Arr = score_<?php echo $gClass;?>.split('/');
agEarnArr[<?php echo $gClass;?>] = 0;

gTitNameArr[19]='一肖';
gTitNameArr[28]='一肖不中';
<?php }elseif($gitem=="numOth"){//特吗项?>
  var score_<?php echo $gClass;?> = '0/0';
  var score_<?php echo $gClass;?>Arr = score_<?php echo $gClass;?>.split('/');
agEarnArr[<?php echo $gClass;?>] = 0;
gTitNameArr[16]='尾數';
gTitNameArr[29]='尾數不中';
gTitNameArr[36]='七碼';


<?php }elseif($gitem=="tw6"){//六肖?>
  var score_18 = '0';
  var score_18Arr = score_18.split('/');
agEarnArr[18] = 0;
<?php }elseif($gitem=="not"){//多选不中?>
  var score_20 = '0';
  var score_20Arr = score_20.split('/');
  var score_24 = '0';
  var score_24Arr = score_24.split('/');
  var score_23 = '0';
  var score_23Arr = score_23.split('/');
  var score_25 = '0';
  var score_25Arr = score_25.split('/');
  var score_26 = '0';
  var score_26Arr = score_26.split('/');
  var score_27 = '0';
  var score_27Arr = score_27.split('/');
limitAmt[20] = '<?php echo $userds[21]['mix'];?>|<?php echo $userds[21]['xx'];?>|<?php echo $userds[21]['xxx'];?>';
limitAmt[24] = '<?php echo $userds[25]['mix'];?>|<?php echo $userds[25]['xx'];?>|<?php echo $userds[25]['xxx'];?>';
limitAmt[23] = '<?php echo $userds[24]['mix'];?>|<?php echo $userds[24]['xx'];?>|<?php echo $userds[24]['xxx'];?>';
limitAmt[25] = '<?php echo $userds[26]['mix'];?>|<?php echo $userds[26]['xx'];?>|<?php echo $userds[26]['xxx'];?>';
limitAmt[26] = '<?php echo $userds[27]['mix'];?>|<?php echo $userds[27]['xx'];?>|<?php echo $userds[27]['xxx'];?>';
limitAmt[27] = '<?php echo $userds[28]['mix'];?>|<?php echo $userds[28]['xx'];?>|<?php echo $userds[28]['xxx'];?>';
gTitNameArr[20]='五不中';
gTitNameArr[24]='六不中';
gTitNameArr[23]='七不中';
gTitNameArr[25]='八不中';
gTitNameArr[26]='九不中';
gTitNameArr[27]='十不中';
<?php }elseif($gitem=="twLm"){//生肖连?>
  var score_21 = '0#0/0#0/0#0/0#0/0#0/0#0/0#0/0#0';
  var score_21Arr = score_21.split('/');
limitAmt[55] = '<?php echo $userds[22]['mix'];?>|<?php echo $userds[22]['xx'];?>|<?php echo $userds[22]['xxx'];?>';
limitAmt[56] = '<?php echo $userds[22]['mix'];?>|<?php echo $userds[22]['xx'];?>|<?php echo $userds[22]['xxx'];?>';
limitAmt[57] = '<?php echo $userds[22]['mix'];?>|<?php echo $userds[22]['xx'];?>|<?php echo $userds[22]['xxx'];?>';
limitAmt[100] = '||';
limitAmt[58] = '<?php echo $userds[22]['mix'];?>|<?php echo $userds[22]['xx'];?>|<?php echo $userds[22]['xxx'];?>';
limitAmt[59] = '<?php echo $userds[22]['mix'];?>|<?php echo $userds[22]['xx'];?>|<?php echo $userds[22]['xxx'];?>';
limitAmt[60] = '<?php echo $userds[22]['mix'];?>|<?php echo $userds[22]['xx'];?>|<?php echo $userds[22]['xxx'];?>';
limitAmt[101] = '||';
gTitNameArr[55]='二肖中';
gTitNameArr[56]='三肖中';
gTitNameArr[57]='四肖中';
gTitNameArr[58]='二肖不中';
gTitNameArr[59]='三肖不中';
gTitNameArr[60]='四肖不中';
<?php }elseif($gitem=="tailLm"){//尾数连?>
 var score_22 = '0#0/0#0/0#0/0#0/0#0/0#0/0#0/0#0';
  var score_22Arr = score_22.split('/');
limitAmt[64] = '<?php echo $userds[23]['mix'];?>|<?php echo $userds[23]['xx'];?>|<?php echo $userds[23]['xxx'];?>';
limitAmt[65] = '<?php echo $userds[23]['mix'];?>|<?php echo $userds[23]['xx'];?>|<?php echo $userds[23]['xxx'];?>';
limitAmt[66] = '<?php echo $userds[23]['mix'];?>|<?php echo $userds[23]['xx'];?>|<?php echo $userds[23]['xxx'];?>';
limitAmt[102] = '||';
limitAmt[67] = '<?php echo $userds[23]['mix'];?>|<?php echo $userds[23]['xx'];?>|<?php echo $userds[23]['xxx'];?>';
limitAmt[68] = '<?php echo $userds[23]['mix'];?>|<?php echo $userds[23]['xx'];?>|<?php echo $userds[23]['xxx'];?>';
limitAmt[69] = '<?php echo $userds[23]['mix'];?>|<?php echo $userds[23]['xx'];?>|<?php echo $userds[23]['xxx'];?>';
limitAmt[103] = '||';
gTitNameArr[64]='二尾中';
gTitNameArr[65]='三尾中';
gTitNameArr[66]='四尾中';
gTitNameArr[67]='二尾不中';
gTitNameArr[68]='三尾不中';
gTitNameArr[69]='四尾不中';
<?php }elseif($gitem=="hit"){//多选中一?>
  var score_30 = '0';
  var score_30Arr = score_30.split('/');
  var score_31 = '0';
  var score_31Arr = score_31.split('/');
  var score_32 = '0';
  var score_32Arr = score_32.split('/');
  var score_33 = '0';
  var score_33Arr = score_33.split('/');
  var score_34 = '0';
  var score_34Arr = score_34.split('/');
  var score_35 = '0';
  var score_35Arr = score_35.split('/');
limitAmt[30] = '<?php echo $userds[31]['mix'];?>|<?php echo $userds[31]['xx'];?>|<?php echo $userds[31]['xxx'];?>';
limitAmt[31] = '<?php echo $userds[32]['mix'];?>|<?php echo $userds[32]['xx'];?>|<?php echo $userds[32]['xxx'];?>';
limitAmt[32] = '<?php echo $userds[33]['mix'];?>|<?php echo $userds[33]['xx'];?>|<?php echo $userds[33]['xxx'];?>';
limitAmt[33] = '<?php echo $userds[34]['mix'];?>|<?php echo $userds[34]['xx'];?>|<?php echo $userds[34]['xxx'];?>';
limitAmt[34] = '<?php echo $userds[35]['mix'];?>|<?php echo $userds[35]['xx'];?>|<?php echo $userds[35]['xxx'];?>';
limitAmt[35] = '<?php echo $userds[36]['mix'];?>|<?php echo $userds[36]['xx'];?>|<?php echo $userds[36]['xxx'];?>';
gTitNameArr[30]='五中一';
gTitNameArr[31]='六中一';
gTitNameArr[32]='七中一';
gTitNameArr[33]='八中一';
gTitNameArr[34]='九中一';
gTitNameArr[35]='十中一';
<?php }elseif($gitem=="want"){//特平中?>
  var score_38 = '0';
  var score_38Arr = score_38.split('/');
  var score_39 = '0';
  var score_39Arr = score_39.split('/');
  var score_40 = '0';
  var score_40Arr = score_40.split('/');
  var score_41 = '0';
  var score_41Arr = score_41.split('/');
  var score_42 = '0';
  var score_42Arr = score_42.split('/');
limitAmt[38] = '<?php echo $userds[39]['mix'];?>|<?php echo $userds[39]['xx'];?>|<?php echo $userds[39]['xxx'];?>';
limitAmt[39] = '<?php echo $userds[40]['mix'];?>|<?php echo $userds[40]['xx'];?>|<?php echo $userds[40]['xxx'];?>';
limitAmt[40] = '<?php echo $userds[41]['mix'];?>|<?php echo $userds[41]['xx'];?>|<?php echo $userds[41]['xxx'];?>';
limitAmt[41] = '<?php echo $userds[42]['mix'];?>|<?php echo $userds[42]['xx'];?>|<?php echo $userds[42]['xxx'];?>';
limitAmt[42] = '<?php echo $userds[43]['mix'];?>|<?php echo $userds[43]['xx'];?>|<?php echo $userds[43]['xxx'];?>';
gTitNameArr[38]='一粒任中';
gTitNameArr[39]='二粒任中';
gTitNameArr[40]='三粒任中';
gTitNameArr[41]='四粒任中';
gTitNameArr[42]='五粒任中';
<?php }?>
    </script>
</body>
</html>